{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import re"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "metadata": {},
   "outputs": [],
   "source": [
    "import os"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 87,
   "metadata": {},
   "outputs": [],
   "source": [
    "string=str(os.environ)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 89,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "\"environ({'ALLUSERSPROFILE': 'C:\\\\\\\\ProgramData', 'APPDATA': 'C:\\\\\\\\Users\\\\\\\\文远\\\\\\\\AppData\\\\\\\\Roaming', 'CLASSPATH': '.;C:\\\\\\\\Program Files\\\\\\\\Java\\\\\\\\jdk1.8.0_191\\\\\\\\bin;C:\\\\\\\\Program Files\\\\\\\\Java\\\\\\\\jdk1.8.0_191\\\\\\\\lib\\\\\\\\dt.jar;C:\\\\\\\\Program Files\\\\\\\\Java\\\\\\\\jdk1.8.0_191\\\\\\\\lib\\\\\\\\tools.jar;E:\\\\\\\\软件\\\\\\\\Lingo12.jar;E:\\\\\\\\BP_lingo\\\\\\\\Lingo12\\\\\\\\Lingo12.jar', 'COMMONPROGRAMFILES': 'C:\\\\\\\\Program Files\\\\\\\\Common Files', 'COMMONPROGRAMFILES(X86)': 'C:\\\\\\\\Program Files (x86)\\\\\\\\Common Files', 'COMMONPROGRAMW6432': 'C:\\\\\\\\Program Files\\\\\\\\Common Files', 'COMPUTERNAME': '文远', 'COMSPEC': 'C:\\\\\\\\WINDOWS\\\\\\\\system32\\\\\\\\cmd.exe', 'CUDA_PATH': 'C:\\\\\\\\Program Files\\\\\\\\NVIDIA GPU Computing Toolkit\\\\\\\\CUDA\\\\\\\\v10.0', 'CUDA_PATH_V10_0': 'C:\\\\\\\\Program Files\\\\\\\\NVIDIA GPU Computing Toolkit\\\\\\\\CUDA\\\\\\\\v10.0', 'DRIVERDATA': 'C:\\\\\\\\Windows\\\\\\\\System32\\\\\\\\Drivers\\\\\\\\DriverData', 'HOMEDRIVE': 'C:', 'HOMEPATH': '\\\\\\\\Users\\\\\\\\文远', 'JAVA_HOME': 'C:\\\\\\\\Program Files\\\\\\\\Java\\\\\\\\jdk1.8.0_191', 'LINGO_12_LICENSE_FILE': 'E:\\\\\\\\软件\\\\\\\\lndlng12.lic;E:\\\\\\\\BP_lingo\\\\\\\\Lingo12\\\\\\\\lndlng12.lic', 'LOCALAPPDATA': 'C:\\\\\\\\Users\\\\\\\\文远\\\\\\\\AppData\\\\\\\\Local', 'LOGONSERVER': '\\\\\\\\\\\\\\\\文远', 'NUMBER_OF_PROCESSORS': '8', 'NVCUDASAMPLES10_0_ROOT': 'C:\\\\\\\\ProgramData\\\\\\\\NVIDIA Corporation\\\\\\\\CUDA Samples\\\\\\\\v10.0', 'NVCUDASAMPLES_ROOT': 'C:\\\\\\\\ProgramData\\\\\\\\NVIDIA Corporation\\\\\\\\CUDA Samples\\\\\\\\v10.0', 'ONEDRIVE': 'C:\\\\\\\\Users\\\\\\\\文远\\\\\\\\OneDrive', 'ONEDRIVECONSUMER': 'C:\\\\\\\\Users\\\\\\\\文远\\\\\\\\OneDrive', 'ONLINESERVICES': 'Online Services', 'OS': 'Windows_NT', 'PATH': 'E:\\\\\\\\PYTHON\\\\\\\\Anaconda\\\\\\\\envs\\\\\\\\pytorch;E:\\\\\\\\PYTHON\\\\\\\\Anaconda\\\\\\\\envs\\\\\\\\pytorch\\\\\\\\Library\\\\\\\\mingw-w64\\\\\\\\bin;E:\\\\\\\\PYTHON\\\\\\\\Anaconda\\\\\\\\envs\\\\\\\\pytorch\\\\\\\\Library\\\\\\\\usr\\\\\\\\bin;E:\\\\\\\\PYTHON\\\\\\\\Anaconda\\\\\\\\envs\\\\\\\\pytorch\\\\\\\\Library\\\\\\\\bin;E:\\\\\\\\PYTHON\\\\\\\\Anaconda\\\\\\\\envs\\\\\\\\pytorch\\\\\\\\Scripts;C:\\\\\\\\Program Files (x86)\\\\\\\\NVIDIA Corporation\\\\\\\\PhysX\\\\\\\\Common;C:\\\\\\\\Program Files\\\\\\\\NVIDIA GPU Computing Toolkit\\\\\\\\CUDA\\\\\\\\v10.0\\\\\\\\bin;C:\\\\\\\\Program Files\\\\\\\\NVIDIA GPU Computing Toolkit\\\\\\\\CUDA\\\\\\\\v10.0\\\\\\\\libnvvp;C:\\\\\\\\Program Files\\\\\\\\Java\\\\\\\\jdk1.8.0_191\\\\\\\\bin;C:\\\\\\\\Program Files\\\\\\\\Java\\\\\\\\jdk1.8.0_191\\\\\\\\jre\\\\\\\\bin;C:\\\\\\\\Program Files (x86)\\\\\\\\Common Files\\\\\\\\Oracle\\\\\\\\Java\\\\\\\\javapath;C:\\\\\\\\windows\\\\\\\\system32;C:\\\\\\\\windows;C:\\\\\\\\windows\\\\\\\\System32\\\\\\\\Wbem;C:\\\\\\\\windows\\\\\\\\System32\\\\\\\\WindowsPowerShell\\\\\\\\v1.0\\\\\\\\;C:\\\\\\\\WINDOWS\\\\\\\\system32;C:\\\\\\\\WINDOWS;C:\\\\\\\\WINDOWS\\\\\\\\System32\\\\\\\\Wbem;C:\\\\\\\\WINDOWS\\\\\\\\System32\\\\\\\\WindowsPowerShell\\\\\\\\v1.0\\\\\\\\;C:\\\\\\\\WINDOWS\\\\\\\\System32\\\\\\\\OpenSSH\\\\\\\\;C:\\\\\\\\Program Files\\\\\\\\Microsoft SQL Server\\\\\\\\130\\\\\\\\Tools\\\\\\\\Binn\\\\\\\\;C:\\\\\\\\Program Files (x86)\\\\\\\\Intel\\\\\\\\Intel(R) Management Engine Components\\\\\\\\DAL;C:\\\\\\\\Program Files\\\\\\\\Intel\\\\\\\\Intel(R) Management Engine Components\\\\\\\\DAL;C:\\\\\\\\Program Files\\\\\\\\Intel\\\\\\\\WiFi\\\\\\\\bin\\\\\\\\;C:\\\\\\\\Program Files\\\\\\\\Common Files\\\\\\\\Intel\\\\\\\\WirelessCommon\\\\\\\\;C:\\\\\\\\Program Files\\\\\\\\Microsoft SQL Server\\\\\\\\Client SDK\\\\\\\\ODBC\\\\\\\\110\\\\\\\\Tools\\\\\\\\Binn\\\\\\\\;C:\\\\\\\\Program Files (x86)\\\\\\\\Microsoft SQL Server\\\\\\\\120\\\\\\\\Tools\\\\\\\\Binn\\\\\\\\;C:\\\\\\\\Program Files\\\\\\\\Microsoft SQL Server\\\\\\\\120\\\\\\\\Tools\\\\\\\\Binn\\\\\\\\;C:\\\\\\\\Program Files\\\\\\\\Microsoft SQL Server\\\\\\\\120\\\\\\\\DTS\\\\\\\\Binn\\\\\\\\;C:\\\\\\\\Program Files (x86)\\\\\\\\Windows Kits\\\\\\\\8.1\\\\\\\\Windows Performance Toolkit\\\\\\\\;E:\\\\\\\\CVI_app\\\\\\\\Windows Performance Toolkit\\\\\\\\;E:\\\\\\\\软件\\\\\\\\;E;\\\\\\\\BP_lingo\\\\\\\\Lingo12\\\\\\\\;E:\\\\\\\\matlab__a\\\\\\\\runtime\\\\\\\\win64;E:\\\\\\\\matlab__a\\\\\\\\bin;E:\\\\\\\\软件\\\\\\\\git_app\\\\\\\\Git\\\\\\\\cmd;E:\\\\\\\\Node_js\\\\\\\\Node_app\\\\\\\\;E:\\\\\\\\Cmake\\\\\\\\bin;C:\\\\\\\\Users\\\\\\\\文远\\\\\\\\AppData\\\\\\\\Local\\\\\\\\Programs\\\\\\\\Python\\\\\\\\Python38\\\\\\\\Scripts\\\\\\\\;C:\\\\\\\\Users\\\\\\\\文远\\\\\\\\AppData\\\\\\\\Local\\\\\\\\Programs\\\\\\\\Python\\\\\\\\Python38\\\\\\\\;E:\\\\\\\\Anadonate;E:\\\\\\\\Anadonate\\\\\\\\Library\\\\\\\\mingw-w64\\\\\\\\bin;E:\\\\\\\\Anadonate\\\\\\\\Library\\\\\\\\usr\\\\\\\\bin;E:\\\\\\\\Anadonate\\\\\\\\Library\\\\\\\\bin;E:\\\\\\\\Anadonate\\\\\\\\Scripts;C:\\\\\\\\Users\\\\\\\\文远\\\\\\\\AppData\\\\\\\\Local\\\\\\\\Microsoft\\\\\\\\WindowsApps;E:\\\\\\\\语言\\\\\\\\pycharm\\\\\\\\python\\\\\\\\PyCharm 2019.1.3\\\\\\\\bin;;E:\\\\\\\\PYTHON\\\\\\\\Pycharm\\\\\\\\PyCharm Community Edition 2019.1.1\\\\\\\\bin;;C:\\\\\\\\Users\\\\\\\\文远\\\\\\\\AppData\\\\\\\\Local\\\\\\\\Programs\\\\\\\\Microsoft VS Code\\\\\\\\bin;E:\\\\\\\\Movie_VIP\\\\\\\\ffmpeg_app\\\\\\\\ffmpeg-20200504-5767a2e-win64-static\\\\\\\\bin;C:\\\\\\\\Users\\\\\\\\文远\\\\\\\\AppData\\\\\\\\Roaming\\\\\\\\npm', 'PATHEXT': '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC', 'PLATFORMCODE': 'AN', 'PROCESSOR_ARCHITECTURE': 'AMD64', 'PROCESSOR_IDENTIFIER': 'Intel64 Family 6 Model 142 Stepping 10, GenuineIntel', 'PROCESSOR_LEVEL': '6', 'PROCESSOR_REVISION': '8e0a', 'PROGRAMDATA': 'C:\\\\\\\\ProgramData', 'PROGRAMFILES': 'C:\\\\\\\\Program Files', 'PROGRAMFILES(X86)': 'C:\\\\\\\\Program Files (x86)', 'PROGRAMW6432': 'C:\\\\\\\\Program Files', 'PSMODULEPATH': 'C:\\\\\\\\Program Files\\\\\\\\WindowsPowerShell\\\\\\\\Modules;C:\\\\\\\\WINDOWS\\\\\\\\system32\\\\\\\\WindowsPowerShell\\\\\\\\v1.0\\\\\\\\Modules;C:\\\\\\\\Program Files (x86)\\\\\\\\Microsoft SQL Server\\\\\\\\120\\\\\\\\Tools\\\\\\\\PowerShell\\\\\\\\Modules\\\\\\\\', 'PTSMINSTALLPATH': 'c:\\\\\\\\Program Files\\\\\\\\HP\\\\\\\\HP ProtectTools Security Manager\\\\\\\\Bin\\\\\\\\', 'PTSMINSTALLPATH_X86': 'c:\\\\\\\\Program Files (x86)\\\\\\\\HP\\\\\\\\HP ProtectTools Security Manager\\\\\\\\Bin\\\\\\\\', 'PUBLIC': 'C:\\\\\\\\Users\\\\\\\\Public', 'PYCHARM': 'E:\\\\\\\\语言\\\\\\\\pycharm\\\\\\\\python\\\\\\\\PyCharm 2019.1.3\\\\\\\\bin;', 'PYCHARM COMMUNITY EDITION': 'E:\\\\\\\\PYTHON\\\\\\\\Pycharm\\\\\\\\PyCharm Community Edition 2019.1.1\\\\\\\\bin;', 'REGIONCODE': 'APJ', 'SESSIONNAME': 'Console', 'SW_SIM_HYDRA': 'C:\\\\\\\\Program Files\\\\\\\\Common Files\\\\\\\\SolidWorks Shared\\\\\\\\Simulation Worker Agent\\\\\\\\', 'SW_SIM_MPIT': 'INTELMPI', 'SW_SIM_TEMP': 'C:\\\\\\\\ProgramData\\\\\\\\SOLIDWORKS\\\\\\\\SW_net_sim_temp\\\\\\\\', 'SYSTEMDRIVE': 'C:', 'SYSTEMROOT': 'C:\\\\\\\\WINDOWS', 'TEMP': 'C:\\\\\\\\Users\\\\\\\\文远\\\\\\\\AppData\\\\\\\\Local\\\\\\\\Temp', 'TMP': 'C:\\\\\\\\Users\\\\\\\\文远\\\\\\\\AppData\\\\\\\\Local\\\\\\\\Temp', 'USERDOMAIN': '文远', 'USERDOMAIN_ROAMINGPROFILE': '文远', 'USERNAME': '文远', 'USERPROFILE': 'C:\\\\\\\\Users\\\\\\\\文远', 'VS140COMNTOOLS': 'E:\\\\\\\\软件\\\\\\\\VS_app\\\\\\\\Common7\\\\\\\\Tools\\\\\\\\', 'WINDIR': 'C:\\\\\\\\WINDOWS', 'CONDA_PREFIX': 'E:\\\\\\\\PYTHON\\\\\\\\Anaconda\\\\\\\\envs\\\\\\\\pytorch', 'JPY_INTERRUPT_EVENT': '1860', 'IPY_INTERRUPT_EVENT': '1860', 'JPY_PARENT_PID': '2020', 'TERM': 'xterm-color', 'CLICOLOR': '1', 'PAGER': 'cat', 'GIT_PAGER': 'cat', 'MPLBACKEND': 'module://ipykernel.pylab.backend_inline'})\""
      ]
     },
     "execution_count": 89,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "string"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "['A', 'ASCII', 'DEBUG', 'DOTALL', 'I', 'IGNORECASE', 'L', 'LOCALE', 'M', 'MULTILINE', 'RegexFlag', 'S', 'Scanner', 'T', 'TEMPLATE', 'U', 'UNICODE', 'VERBOSE', 'X', '_MAXCACHE', '__all__', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__', '__version__', '_alphanum_bytes', '_alphanum_str', '_cache', '_compile', '_compile_repl', '_expand', '_locale', '_pattern_type', '_pickle', '_subx', 'compile', 'copyreg', 'enum', 'error', 'escape', 'findall', 'finditer', 'fullmatch', 'functools', 'match', 'purge', 'search', 'split', 'sre_compile', 'sre_parse', 'sub', 'subn', 'template']\n"
     ]
    }
   ],
   "source": [
    "print(dir(re))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "58"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(dir(re))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [],
   "source": [
    "url='https://ashleyzh666.github.io/'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 常用方法\n",
    "? re.findall\n",
    "Signature:  re.findall(pattern, string, flags=0)\n",
    "Docstring:\n",
    "Return a list of all non-overlapping matches in the string.\n",
    "\n",
    "If one or more capturing groups are present in the pattern, return\n",
    "a list of groups; this will be a list of tuples if the pattern\n",
    "has more than one group.\n",
    "\n",
    "Empty matches are included in the result.\n",
    "File:      e:\\python\\anaconda\\envs\\pytorch\\lib\\re.py\n",
    "Type:      function"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [],
   "source": [
    "retu=re.findall(r'\\d*',url)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "29"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# len(retu)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "https://ashleyzh666.github.io/\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "['://', '.', '.', '/']"
      ]
     },
     "execution_count": 34,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "re.search(r'\\W',url)\n",
    "print(url)\n",
    "re.findall(r'\\W+',url)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [],
   "source": [
    "#??? match()函数有些奇怪\n",
    "zz=re.match('\\d',url,1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "? re.match\n",
    "Signature:  re.match(pattern, string, flags=0)\n",
    "Docstring:\n",
    "Try to apply the pattern at the start of the string, returning\n",
    "a match object, or None if no match was found.\n",
    "File:      e:\\python\\anaconda\\envs\\pytorch\\lib\\re.py\n",
    "Type:      function"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "None\n"
     ]
    }
   ],
   "source": [
    "print(zz)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['https://ashleyzh', '', '', '.github.io/']"
      ]
     },
     "execution_count": 40,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "re.split('\\d',url)\n",
    "#默认会将匹配到的字符都去掉"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2"
      ]
     },
     "execution_count": 32,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(re.split('\\d',url,1))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 86,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "\"https://ashleyzhenviron({'ALLUSERSPROFILE': 'C:\\\\ProgramData', 'APPDATA': 'C:\\\\Users\\\\文远\\\\AppData\\\\Roaming', 'CLASSPATH': '.;C:\\\\Program Files\\\\Java\\\\jdk1.8.0_191\\\\bin;C:\\\\Program Files\\\\Java\\\\jdk1.8.0_191\\\\lib\\\\dt.jar;C:\\\\Program Files\\\\Java\\\\jdk1.8.0_191\\\\lib\\\\tools.jar;E:\\\\软件\\\\Lingo12.jar;E:\\\\BP_lingo\\\\Lingo12\\\\Lingo12.jar', 'COMMONPROGRAMFILES': 'C:\\\\Program Files\\\\Common Files', 'COMMONPROGRAMFILES(X86)': 'C:\\\\Program Files (x86)\\\\Common Files', 'COMMONPROGRAMW6432': 'C:\\\\Program Files\\\\Common Files', 'COMPUTERNAME': '文远', 'COMSPEC': 'C:\\\\WINDOWS\\\\system32\\\\cmd.exe', 'CUDA_PATH': 'C:\\\\Program Files\\\\NVIDIA GPU Computing Toolkit\\\\CUDA\\\\v10.0', 'CUDA_PATH_V10_0': 'C:\\\\Program Files\\\\NVIDIA GPU Computing Toolkit\\\\CUDA\\\\v10.0', 'DRIVERDATA': 'C:\\\\Windows\\\\System32\\\\Drivers\\\\DriverData', 'HOMEDRIVE': 'C:', 'HOMEPATH': '\\\\Users\\\\文远', 'JAVA_HOME': 'C:\\\\Program Files\\\\Java\\\\jdk1.8.0_191', 'LINGO_12_LICENSE_FILE': 'E:\\\\软件\\\\lndlng12.lic;E:\\\\BP_lingo\\\\Lingo12\\\\lndlng12.lic', 'LOCALAPPDATA': 'C:\\\\Users\\\\文远\\\\AppData\\\\Local', 'LOGONSERVER': '\\\\\\\\文远', 'NUMBER_OF_PROCESSORS': '8', 'NVCUDASAMPLES10_0_ROOT': 'C:\\\\ProgramData\\\\NVIDIA Corporation\\\\CUDA Samples\\\\v10.0', 'NVCUDASAMPLES_ROOT': 'C:\\\\ProgramData\\\\NVIDIA Corporation\\\\CUDA Samples\\\\v10.0', 'ONEDRIVE': 'C:\\\\Users\\\\文远\\\\OneDrive', 'ONEDRIVECONSUMER': 'C:\\\\Users\\\\文远\\\\OneDrive', 'ONLINESERVICES': 'Online Services', 'OS': 'Windows_NT', 'PATH': 'E:\\\\PYTHON\\\\Anaconda\\\\envs\\\\pytorch;E:\\\\PYTHON\\\\Anaconda\\\\envs\\\\pytorch\\\\Library\\\\mingw-w64\\\\bin;E:\\\\PYTHON\\\\Anaconda\\\\envs\\\\pytorch\\\\Library\\\\usr\\\\bin;E:\\\\PYTHON\\\\Anaconda\\\\envs\\\\pytorch\\\\Library\\\\bin;E:\\\\PYTHON\\\\Anaconda\\\\envs\\\\pytorch\\\\Scripts;C:\\\\Program Files (x86)\\\\NVIDIA Corporation\\\\PhysX\\\\Common;C:\\\\Program Files\\\\NVIDIA GPU Computing Toolkit\\\\CUDA\\\\v10.0\\\\bin;C:\\\\Program Files\\\\NVIDIA GPU Computing Toolkit\\\\CUDA\\\\v10.0\\\\libnvvp;C:\\\\Program Files\\\\Java\\\\jdk1.8.0_191\\\\bin;C:\\\\Program Files\\\\Java\\\\jdk1.8.0_191\\\\jre\\\\bin;C:\\\\Program Files (x86)\\\\Common Files\\\\Oracle\\\\Java\\\\javapath;C:\\\\windows\\\\system32;C:\\\\windows;C:\\\\windows\\\\System32\\\\Wbem;C:\\\\windows\\\\System32\\\\WindowsPowerShell\\\\v1.0\\\\;C:\\\\WINDOWS\\\\system32;C:\\\\WINDOWS;C:\\\\WINDOWS\\\\System32\\\\Wbem;C:\\\\WINDOWS\\\\System32\\\\WindowsPowerShell\\\\v1.0\\\\;C:\\\\WINDOWS\\\\System32\\\\OpenSSH\\\\;C:\\\\Program Files\\\\Microsoft SQL Server\\\\130\\\\Tools\\\\Binn\\\\;C:\\\\Program Files (x86)\\\\Intel\\\\Intel(R) Management Engine Components\\\\DAL;C:\\\\Program Files\\\\Intel\\\\Intel(R) Management Engine Components\\\\DAL;C:\\\\Program Files\\\\Intel\\\\WiFi\\\\bin\\\\;C:\\\\Program Files\\\\Common Files\\\\Intel\\\\WirelessCommon\\\\;C:\\\\Program Files\\\\Microsoft SQL Server\\\\Client SDK\\\\ODBC\\\\110\\\\Tools\\\\Binn\\\\;C:\\\\Program Files (x86)\\\\Microsoft SQL Server\\\\120\\\\Tools\\\\Binn\\\\;C:\\\\Program Files\\\\Microsoft SQL Server\\\\120\\\\Tools\\\\Binn\\\\;C:\\\\Program Files\\\\Microsoft SQL Server\\\\120\\\\DTS\\\\Binn\\\\;C:\\\\Program Files (x86)\\\\Windows Kits\\\\8.1\\\\Windows Performance Toolkit\\\\;E:\\\\CVI_app\\\\Windows Performance Toolkit\\\\;E:\\\\软件\\\\;E;\\\\BP_lingo\\\\Lingo12\\\\;E:\\\\matlab__a\\\\runtime\\\\win64;E:\\\\matlab__a\\\\bin;E:\\\\软件\\\\git_app\\\\Git\\\\cmd;E:\\\\Node_js\\\\Node_app\\\\;E:\\\\Cmake\\\\bin;C:\\\\Users\\\\文远\\\\AppData\\\\Local\\\\Programs\\\\Python\\\\Python38\\\\Scripts\\\\;C:\\\\Users\\\\文远\\\\AppData\\\\Local\\\\Programs\\\\Python\\\\Python38\\\\;E:\\\\Anadonate;E:\\\\Anadonate\\\\Library\\\\mingw-w64\\\\bin;E:\\\\Anadonate\\\\Library\\\\usr\\\\bin;E:\\\\Anadonate\\\\Library\\\\bin;E:\\\\Anadonate\\\\Scripts;C:\\\\Users\\\\文远\\\\AppData\\\\Local\\\\Microsoft\\\\WindowsApps;E:\\\\语言\\\\pycharm\\\\python\\\\PyCharm 2019.1.3\\\\bin;;E:\\\\PYTHON\\\\Pycharm\\\\PyCharm Community Edition 2019.1.1\\\\bin;;C:\\\\Users\\\\文远\\\\AppData\\\\Local\\\\Programs\\\\Microsoft VS Code\\\\bin;E:\\\\Movie_VIP\\\\ffmpeg_app\\\\ffmpeg-20200504-5767a2e-win64-static\\\\bin;C:\\\\Users\\\\文远\\\\AppData\\\\Roaming\\\\npm', 'PATHEXT': '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC', 'PLATFORMCODE': 'AN', 'PROCESSOR_ARCHITECTURE': 'AMD64', 'PROCESSOR_IDENTIFIER': 'Intel64 Family 6 Model 142 Stepping 10, GenuineIntel', 'PROCESSOR_LEVEL': '6', 'PROCESSOR_REVISION': '8e0a', 'PROGRAMDATA': 'C:\\\\ProgramData', 'PROGRAMFILES': 'C:\\\\Program Files', 'PROGRAMFILES(X86)': 'C:\\\\Program Files (x86)', 'PROGRAMW6432': 'C:\\\\Program Files', 'PSMODULEPATH': 'C:\\\\Program Files\\\\WindowsPowerShell\\\\Modules;C:\\\\WINDOWS\\\\system32\\\\WindowsPowerShell\\\\v1.0\\\\Modules;C:\\\\Program Files (x86)\\\\Microsoft SQL Server\\\\120\\\\Tools\\\\PowerShell\\\\Modules\\\\', 'PTSMINSTALLPATH': 'c:\\\\Program Files\\\\HP\\\\HP ProtectTools Security Manager\\\\Bin\\\\', 'PTSMINSTALLPATH_X86': 'c:\\\\Program Files (x86)\\\\HP\\\\HP ProtectTools Security Manager\\\\Bin\\\\', 'PUBLIC': 'C:\\\\Users\\\\Public', 'PYCHARM': 'E:\\\\语言\\\\pycharm\\\\python\\\\PyCharm 2019.1.3\\\\bin;', 'PYCHARM COMMUNITY EDITION': 'E:\\\\PYTHON\\\\Pycharm\\\\PyCharm Community Edition 2019.1.1\\\\bin;', 'REGIONCODE': 'APJ', 'SESSIONNAME': 'Console', 'SW_SIM_HYDRA': 'C:\\\\Program Files\\\\Common Files\\\\SolidWorks Shared\\\\Simulation Worker Agent\\\\', 'SW_SIM_MPIT': 'INTELMPI', 'SW_SIM_TEMP': 'C:\\\\ProgramData\\\\SOLIDWORKS\\\\SW_net_sim_temp\\\\', 'SYSTEMDRIVE': 'C:', 'SYSTEMROOT': 'C:\\\\WINDOWS', 'TEMP': 'C:\\\\Users\\\\文远\\\\AppData\\\\Local\\\\Temp', 'TMP': 'C:\\\\Users\\\\文远\\\\AppData\\\\Local\\\\Temp', 'USERDOMAIN': '文远', 'USERDOMAIN_ROAMINGPROFILE': '文远', 'USERNAME': '文远', 'USERPROFILE': 'C:\\\\Users\\\\文远', 'VS140COMNTOOLS': 'E:\\\\软件\\\\VS_app\\\\Common7\\\\Tools\\\\', 'WINDIR': 'C:\\\\WINDOWS', 'CONDA_PREFIX': 'E:\\\\PYTHON\\\\Anaconda\\\\envs\\\\pytorch', 'JPY_INTERRUPT_EVENT': '1860', 'IPY_INTERRUPT_EVENT': '1860', 'JPY_PARENT_PID': '2020', 'TERM': 'xterm-color', 'CLICOLOR': '1', 'PAGER': 'cat', 'GIT_PAGER': 'cat', 'MPLBACKEND': 'module://ipykernel.pylab.backend_inline'})environ({'ALLUSERSPROFILE': 'C:\\\\ProgramData', 'APPDATA': 'C:\\\\Users\\\\文远\\\\AppData\\\\Roaming', 'CLASSPATH': '.;C:\\\\Program Files\\\\Java\\\\jdk1.8.0_191\\\\bin;C:\\\\Program Files\\\\Java\\\\jdk1.8.0_191\\\\lib\\\\dt.jar;C:\\\\Program Files\\\\Java\\\\jdk1.8.0_191\\\\lib\\\\tools.jar;E:\\\\软件\\\\Lingo12.jar;E:\\\\BP_lingo\\\\Lingo12\\\\Lingo12.jar', 'COMMONPROGRAMFILES': 'C:\\\\Program Files\\\\Common Files', 'COMMONPROGRAMFILES(X86)': 'C:\\\\Program Files (x86)\\\\Common Files', 'COMMONPROGRAMW6432': 'C:\\\\Program Files\\\\Common Files', 'COMPUTERNAME': '文远', 'COMSPEC': 'C:\\\\WINDOWS\\\\system32\\\\cmd.exe', 'CUDA_PATH': 'C:\\\\Program Files\\\\NVIDIA GPU Computing Toolkit\\\\CUDA\\\\v10.0', 'CUDA_PATH_V10_0': 'C:\\\\Program Files\\\\NVIDIA GPU Computing Toolkit\\\\CUDA\\\\v10.0', 'DRIVERDATA': 'C:\\\\Windows\\\\System32\\\\Drivers\\\\DriverData', 'HOMEDRIVE': 'C:', 'HOMEPATH': '\\\\Users\\\\文远', 'JAVA_HOME': 'C:\\\\Program Files\\\\Java\\\\jdk1.8.0_191', 'LINGO_12_LICENSE_FILE': 'E:\\\\软件\\\\lndlng12.lic;E:\\\\BP_lingo\\\\Lingo12\\\\lndlng12.lic', 'LOCALAPPDATA': 'C:\\\\Users\\\\文远\\\\AppData\\\\Local', 'LOGONSERVER': '\\\\\\\\文远', 'NUMBER_OF_PROCESSORS': '8', 'NVCUDASAMPLES10_0_ROOT': 'C:\\\\ProgramData\\\\NVIDIA Corporation\\\\CUDA Samples\\\\v10.0', 'NVCUDASAMPLES_ROOT': 'C:\\\\ProgramData\\\\NVIDIA Corporation\\\\CUDA Samples\\\\v10.0', 'ONEDRIVE': 'C:\\\\Users\\\\文远\\\\OneDrive', 'ONEDRIVECONSUMER': 'C:\\\\Users\\\\文远\\\\OneDrive', 'ONLINESERVICES': 'Online Services', 'OS': 'Windows_NT', 'PATH': 'E:\\\\PYTHON\\\\Anaconda\\\\envs\\\\pytorch;E:\\\\PYTHON\\\\Anaconda\\\\envs\\\\pytorch\\\\Library\\\\mingw-w64\\\\bin;E:\\\\PYTHON\\\\Anaconda\\\\envs\\\\pytorch\\\\Library\\\\usr\\\\bin;E:\\\\PYTHON\\\\Anaconda\\\\envs\\\\pytorch\\\\Library\\\\bin;E:\\\\PYTHON\\\\Anaconda\\\\envs\\\\pytorch\\\\Scripts;C:\\\\Program Files (x86)\\\\NVIDIA Corporation\\\\PhysX\\\\Common;C:\\\\Program Files\\\\NVIDIA GPU Computing Toolkit\\\\CUDA\\\\v10.0\\\\bin;C:\\\\Program Files\\\\NVIDIA GPU Computing Toolkit\\\\CUDA\\\\v10.0\\\\libnvvp;C:\\\\Program Files\\\\Java\\\\jdk1.8.0_191\\\\bin;C:\\\\Program Files\\\\Java\\\\jdk1.8.0_191\\\\jre\\\\bin;C:\\\\Program Files (x86)\\\\Common Files\\\\Oracle\\\\Java\\\\javapath;C:\\\\windows\\\\system32;C:\\\\windows;C:\\\\windows\\\\System32\\\\Wbem;C:\\\\windows\\\\System32\\\\WindowsPowerShell\\\\v1.0\\\\;C:\\\\WINDOWS\\\\system32;C:\\\\WINDOWS;C:\\\\WINDOWS\\\\System32\\\\Wbem;C:\\\\WINDOWS\\\\System32\\\\WindowsPowerShell\\\\v1.0\\\\;C:\\\\WINDOWS\\\\System32\\\\OpenSSH\\\\;C:\\\\Program Files\\\\Microsoft SQL Server\\\\130\\\\Tools\\\\Binn\\\\;C:\\\\Program Files (x86)\\\\Intel\\\\Intel(R) Management Engine Components\\\\DAL;C:\\\\Program Files\\\\Intel\\\\Intel(R) Management Engine Components\\\\DAL;C:\\\\Program Files\\\\Intel\\\\WiFi\\\\bin\\\\;C:\\\\Program Files\\\\Common Files\\\\Intel\\\\WirelessCommon\\\\;C:\\\\Program Files\\\\Microsoft SQL Server\\\\Client SDK\\\\ODBC\\\\110\\\\Tools\\\\Binn\\\\;C:\\\\Program Files (x86)\\\\Microsoft SQL Server\\\\120\\\\Tools\\\\Binn\\\\;C:\\\\Program Files\\\\Microsoft SQL Server\\\\120\\\\Tools\\\\Binn\\\\;C:\\\\Program Files\\\\Microsoft SQL Server\\\\120\\\\DTS\\\\Binn\\\\;C:\\\\Program Files (x86)\\\\Windows Kits\\\\8.1\\\\Windows Performance Toolkit\\\\;E:\\\\CVI_app\\\\Windows Performance Toolkit\\\\;E:\\\\软件\\\\;E;\\\\BP_lingo\\\\Lingo12\\\\;E:\\\\matlab__a\\\\runtime\\\\win64;E:\\\\matlab__a\\\\bin;E:\\\\软件\\\\git_app\\\\Git\\\\cmd;E:\\\\Node_js\\\\Node_app\\\\;E:\\\\Cmake\\\\bin;C:\\\\Users\\\\文远\\\\AppData\\\\Local\\\\Programs\\\\Python\\\\Python38\\\\Scripts\\\\;C:\\\\Users\\\\文远\\\\AppData\\\\Local\\\\Programs\\\\Python\\\\Python38\\\\;E:\\\\Anadonate;E:\\\\Anadonate\\\\Library\\\\mingw-w64\\\\bin;E:\\\\Anadonate\\\\Library\\\\usr\\\\bin;E:\\\\Anadonate\\\\Library\\\\bin;E:\\\\Anadonate\\\\Scripts;C:\\\\Users\\\\文远\\\\AppData\\\\Local\\\\Microsoft\\\\WindowsApps;E:\\\\语言\\\\pycharm\\\\python\\\\PyCharm 2019.1.3\\\\bin;;E:\\\\PYTHON\\\\Pycharm\\\\PyCharm Community Edition 2019.1.1\\\\bin;;C:\\\\Users\\\\文远\\\\AppData\\\\Local\\\\Programs\\\\Microsoft VS Code\\\\bin;E:\\\\Movie_VIP\\\\ffmpeg_app\\\\ffmpeg-20200504-5767a2e-win64-static\\\\bin;C:\\\\Users\\\\文远\\\\AppData\\\\Roaming\\\\npm', 'PATHEXT': '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC', 'PLATFORMCODE': 'AN', 'PROCESSOR_ARCHITECTURE': 'AMD64', 'PROCESSOR_IDENTIFIER': 'Intel64 Family 6 Model 142 Stepping 10, GenuineIntel', 'PROCESSOR_LEVEL': '6', 'PROCESSOR_REVISION': '8e0a', 'PROGRAMDATA': 'C:\\\\ProgramData', 'PROGRAMFILES': 'C:\\\\Program Files', 'PROGRAMFILES(X86)': 'C:\\\\Program Files (x86)', 'PROGRAMW6432': 'C:\\\\Program Files', 'PSMODULEPATH': 'C:\\\\Program Files\\\\WindowsPowerShell\\\\Modules;C:\\\\WINDOWS\\\\system32\\\\WindowsPowerShell\\\\v1.0\\\\Modules;C:\\\\Program Files (x86)\\\\Microsoft SQL Server\\\\120\\\\Tools\\\\PowerShell\\\\Modules\\\\', 'PTSMINSTALLPATH': 'c:\\\\Program Files\\\\HP\\\\HP ProtectTools Security Manager\\\\Bin\\\\', 'PTSMINSTALLPATH_X86': 'c:\\\\Program Files (x86)\\\\HP\\\\HP ProtectTools Security Manager\\\\Bin\\\\', 'PUBLIC': 'C:\\\\Users\\\\Public', 'PYCHARM': 'E:\\\\语言\\\\pycharm\\\\python\\\\PyCharm 2019.1.3\\\\bin;', 'PYCHARM COMMUNITY EDITION': 'E:\\\\PYTHON\\\\Pycharm\\\\PyCharm Community Edition 2019.1.1\\\\bin;', 'REGIONCODE': 'APJ', 'SESSIONNAME': 'Console', 'SW_SIM_HYDRA': 'C:\\\\Program Files\\\\Common Files\\\\SolidWorks Shared\\\\Simulation Worker Agent\\\\', 'SW_SIM_MPIT': 'INTELMPI', 'SW_SIM_TEMP': 'C:\\\\ProgramData\\\\SOLIDWORKS\\\\SW_net_sim_temp\\\\', 'SYSTEMDRIVE': 'C:', 'SYSTEMROOT': 'C:\\\\WINDOWS', 'TEMP': 'C:\\\\Users\\\\文远\\\\AppData\\\\Local\\\\Temp', 'TMP': 'C:\\\\Users\\\\文远\\\\AppData\\\\Local\\\\Temp', 'USERDOMAIN': '文远', 'USERDOMAIN_ROAMINGPROFILE': '文远', 'USERNAME': '文远', 'USERPROFILE': 'C:\\\\Users\\\\文远', 'VS140COMNTOOLS': 'E:\\\\软件\\\\VS_app\\\\Common7\\\\Tools\\\\', 'WINDIR': 'C:\\\\WINDOWS', 'CONDA_PREFIX': 'E:\\\\PYTHON\\\\Anaconda\\\\envs\\\\pytorch', 'JPY_INTERRUPT_EVENT': '1860', 'IPY_INTERRUPT_EVENT': '1860', 'JPY_PARENT_PID': '2020', 'TERM': 'xterm-color', 'CLICOLOR': '1', 'PAGER': 'cat', 'GIT_PAGER': 'cat', 'MPLBACKEND': 'module://ipykernel.pylab.backend_inline'})environ({'ALLUSERSPROFILE': 'C:\\\\ProgramData', 'APPDATA': 'C:\\\\Users\\\\文远\\\\AppData\\\\Roaming', 'CLASSPATH': '.;C:\\\\Program Files\\\\Java\\\\jdk1.8.0_191\\\\bin;C:\\\\Program Files\\\\Java\\\\jdk1.8.0_191\\\\lib\\\\dt.jar;C:\\\\Program Files\\\\Java\\\\jdk1.8.0_191\\\\lib\\\\tools.jar;E:\\\\软件\\\\Lingo12.jar;E:\\\\BP_lingo\\\\Lingo12\\\\Lingo12.jar', 'COMMONPROGRAMFILES': 'C:\\\\Program Files\\\\Common Files', 'COMMONPROGRAMFILES(X86)': 'C:\\\\Program Files (x86)\\\\Common Files', 'COMMONPROGRAMW6432': 'C:\\\\Program Files\\\\Common Files', 'COMPUTERNAME': '文远', 'COMSPEC': 'C:\\\\WINDOWS\\\\system32\\\\cmd.exe', 'CUDA_PATH': 'C:\\\\Program Files\\\\NVIDIA GPU Computing Toolkit\\\\CUDA\\\\v10.0', 'CUDA_PATH_V10_0': 'C:\\\\Program Files\\\\NVIDIA GPU Computing Toolkit\\\\CUDA\\\\v10.0', 'DRIVERDATA': 'C:\\\\Windows\\\\System32\\\\Drivers\\\\DriverData', 'HOMEDRIVE': 'C:', 'HOMEPATH': '\\\\Users\\\\文远', 'JAVA_HOME': 'C:\\\\Program Files\\\\Java\\\\jdk1.8.0_191', 'LINGO_12_LICENSE_FILE': 'E:\\\\软件\\\\lndlng12.lic;E:\\\\BP_lingo\\\\Lingo12\\\\lndlng12.lic', 'LOCALAPPDATA': 'C:\\\\Users\\\\文远\\\\AppData\\\\Local', 'LOGONSERVER': '\\\\\\\\文远', 'NUMBER_OF_PROCESSORS': '8', 'NVCUDASAMPLES10_0_ROOT': 'C:\\\\ProgramData\\\\NVIDIA Corporation\\\\CUDA Samples\\\\v10.0', 'NVCUDASAMPLES_ROOT': 'C:\\\\ProgramData\\\\NVIDIA Corporation\\\\CUDA Samples\\\\v10.0', 'ONEDRIVE': 'C:\\\\Users\\\\文远\\\\OneDrive', 'ONEDRIVECONSUMER': 'C:\\\\Users\\\\文远\\\\OneDrive', 'ONLINESERVICES': 'Online Services', 'OS': 'Windows_NT', 'PATH': 'E:\\\\PYTHON\\\\Anaconda\\\\envs\\\\pytorch;E:\\\\PYTHON\\\\Anaconda\\\\envs\\\\pytorch\\\\Library\\\\mingw-w64\\\\bin;E:\\\\PYTHON\\\\Anaconda\\\\envs\\\\pytorch\\\\Library\\\\usr\\\\bin;E:\\\\PYTHON\\\\Anaconda\\\\envs\\\\pytorch\\\\Library\\\\bin;E:\\\\PYTHON\\\\Anaconda\\\\envs\\\\pytorch\\\\Scripts;C:\\\\Program Files (x86)\\\\NVIDIA Corporation\\\\PhysX\\\\Common;C:\\\\Program Files\\\\NVIDIA GPU Computing Toolkit\\\\CUDA\\\\v10.0\\\\bin;C:\\\\Program Files\\\\NVIDIA GPU Computing Toolkit\\\\CUDA\\\\v10.0\\\\libnvvp;C:\\\\Program Files\\\\Java\\\\jdk1.8.0_191\\\\bin;C:\\\\Program Files\\\\Java\\\\jdk1.8.0_191\\\\jre\\\\bin;C:\\\\Program Files (x86)\\\\Common Files\\\\Oracle\\\\Java\\\\javapath;C:\\\\windows\\\\system32;C:\\\\windows;C:\\\\windows\\\\System32\\\\Wbem;C:\\\\windows\\\\System32\\\\WindowsPowerShell\\\\v1.0\\\\;C:\\\\WINDOWS\\\\system32;C:\\\\WINDOWS;C:\\\\WINDOWS\\\\System32\\\\Wbem;C:\\\\WINDOWS\\\\System32\\\\WindowsPowerShell\\\\v1.0\\\\;C:\\\\WINDOWS\\\\System32\\\\OpenSSH\\\\;C:\\\\Program Files\\\\Microsoft SQL Server\\\\130\\\\Tools\\\\Binn\\\\;C:\\\\Program Files (x86)\\\\Intel\\\\Intel(R) Management Engine Components\\\\DAL;C:\\\\Program Files\\\\Intel\\\\Intel(R) Management Engine Components\\\\DAL;C:\\\\Program Files\\\\Intel\\\\WiFi\\\\bin\\\\;C:\\\\Program Files\\\\Common Files\\\\Intel\\\\WirelessCommon\\\\;C:\\\\Program Files\\\\Microsoft SQL Server\\\\Client SDK\\\\ODBC\\\\110\\\\Tools\\\\Binn\\\\;C:\\\\Program Files (x86)\\\\Microsoft SQL Server\\\\120\\\\Tools\\\\Binn\\\\;C:\\\\Program Files\\\\Microsoft SQL Server\\\\120\\\\Tools\\\\Binn\\\\;C:\\\\Program Files\\\\Microsoft SQL Server\\\\120\\\\DTS\\\\Binn\\\\;C:\\\\Program Files (x86)\\\\Windows Kits\\\\8.1\\\\Windows Performance Toolkit\\\\;E:\\\\CVI_app\\\\Windows Performance Toolkit\\\\;E:\\\\软件\\\\;E;\\\\BP_lingo\\\\Lingo12\\\\;E:\\\\matlab__a\\\\runtime\\\\win64;E:\\\\matlab__a\\\\bin;E:\\\\软件\\\\git_app\\\\Git\\\\cmd;E:\\\\Node_js\\\\Node_app\\\\;E:\\\\Cmake\\\\bin;C:\\\\Users\\\\文远\\\\AppData\\\\Local\\\\Programs\\\\Python\\\\Python38\\\\Scripts\\\\;C:\\\\Users\\\\文远\\\\AppData\\\\Local\\\\Programs\\\\Python\\\\Python38\\\\;E:\\\\Anadonate;E:\\\\Anadonate\\\\Library\\\\mingw-w64\\\\bin;E:\\\\Anadonate\\\\Library\\\\usr\\\\bin;E:\\\\Anadonate\\\\Library\\\\bin;E:\\\\Anadonate\\\\Scripts;C:\\\\Users\\\\文远\\\\AppData\\\\Local\\\\Microsoft\\\\WindowsApps;E:\\\\语言\\\\pycharm\\\\python\\\\PyCharm 2019.1.3\\\\bin;;E:\\\\PYTHON\\\\Pycharm\\\\PyCharm Community Edition 2019.1.1\\\\bin;;C:\\\\Users\\\\文远\\\\AppData\\\\Local\\\\Programs\\\\Microsoft VS Code\\\\bin;E:\\\\Movie_VIP\\\\ffmpeg_app\\\\ffmpeg-20200504-5767a2e-win64-static\\\\bin;C:\\\\Users\\\\文远\\\\AppData\\\\Roaming\\\\npm', 'PATHEXT': '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC', 'PLATFORMCODE': 'AN', 'PROCESSOR_ARCHITECTURE': 'AMD64', 'PROCESSOR_IDENTIFIER': 'Intel64 Family 6 Model 142 Stepping 10, GenuineIntel', 'PROCESSOR_LEVEL': '6', 'PROCESSOR_REVISION': '8e0a', 'PROGRAMDATA': 'C:\\\\ProgramData', 'PROGRAMFILES': 'C:\\\\Program Files', 'PROGRAMFILES(X86)': 'C:\\\\Program Files (x86)', 'PROGRAMW6432': 'C:\\\\Program Files', 'PSMODULEPATH': 'C:\\\\Program Files\\\\WindowsPowerShell\\\\Modules;C:\\\\WINDOWS\\\\system32\\\\WindowsPowerShell\\\\v1.0\\\\Modules;C:\\\\Program Files (x86)\\\\Microsoft SQL Server\\\\120\\\\Tools\\\\PowerShell\\\\Modules\\\\', 'PTSMINSTALLPATH': 'c:\\\\Program Files\\\\HP\\\\HP ProtectTools Security Manager\\\\Bin\\\\', 'PTSMINSTALLPATH_X86': 'c:\\\\Program Files (x86)\\\\HP\\\\HP ProtectTools Security Manager\\\\Bin\\\\', 'PUBLIC': 'C:\\\\Users\\\\Public', 'PYCHARM': 'E:\\\\语言\\\\pycharm\\\\python\\\\PyCharm 2019.1.3\\\\bin;', 'PYCHARM COMMUNITY EDITION': 'E:\\\\PYTHON\\\\Pycharm\\\\PyCharm Community Edition 2019.1.1\\\\bin;', 'REGIONCODE': 'APJ', 'SESSIONNAME': 'Console', 'SW_SIM_HYDRA': 'C:\\\\Program Files\\\\Common Files\\\\SolidWorks Shared\\\\Simulation Worker Agent\\\\', 'SW_SIM_MPIT': 'INTELMPI', 'SW_SIM_TEMP': 'C:\\\\ProgramData\\\\SOLIDWORKS\\\\SW_net_sim_temp\\\\', 'SYSTEMDRIVE': 'C:', 'SYSTEMROOT': 'C:\\\\WINDOWS', 'TEMP': 'C:\\\\Users\\\\文远\\\\AppData\\\\Local\\\\Temp', 'TMP': 'C:\\\\Users\\\\文远\\\\AppData\\\\Local\\\\Temp', 'USERDOMAIN': '文远', 'USERDOMAIN_ROAMINGPROFILE': '文远', 'USERNAME': '文远', 'USERPROFILE': 'C:\\\\Users\\\\文远', 'VS140COMNTOOLS': 'E:\\\\软件\\\\VS_app\\\\Common7\\\\Tools\\\\', 'WINDIR': 'C:\\\\WINDOWS', 'CONDA_PREFIX': 'E:\\\\PYTHON\\\\Anaconda\\\\envs\\\\pytorch', 'JPY_INTERRUPT_EVENT': '1860', 'IPY_INTERRUPT_EVENT': '1860', 'JPY_PARENT_PID': '2020', 'TERM': 'xterm-color', 'CLICOLOR': '1', 'PAGER': 'cat', 'GIT_PAGER': 'cat', 'MPLBACKEND': 'module://ipykernel.pylab.backend_inline'}).github.io/\""
      ]
     },
     "execution_count": 86,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "re.sub('\\d',string,url)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 54,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "\"https://ashleyzhenviron({'ALLUSERSPROFILE': 'C:\\\\ProgramData', 'APPDATA': 'C:\\\\Users\\\\文远\\\\AppData\\\\Roaming', 'CLASSPATH': '.;C:\\\\Program Files\\\\Java\\\\jdk1.8.0_191\\\\bin;C:\\\\Program Files\\\\Java\\\\jdk1.8.0_191\\\\lib\\\\dt.jar;C:\\\\Program Files\\\\Java\\\\jdk1.8.0_191\\\\lib\\\\tools.jar;E:\\\\软件\\\\Lingo12.jar;E:\\\\BP_lingo\\\\Lingo12\\\\Lingo12.jar', 'COMMONPROGRAMFILES': 'C:\\\\Program Files\\\\Common Files', 'COMMONPROGRAMFILES(X86)': 'C:\\\\Program Files (x86)\\\\Common Files', 'COMMONPROGRAMW6432': 'C:\\\\Program Files\\\\Common Files', 'COMPUTERNAME': '文远', 'COMSPEC': 'C:\\\\WINDOWS\\\\system32\\\\cmd.exe', 'CUDA_PATH': 'C:\\\\Program Files\\\\NVIDIA GPU Computing Toolkit\\\\CUDA\\\\v10.0', 'CUDA_PATH_V10_0': 'C:\\\\Program Files\\\\NVIDIA GPU Computing Toolkit\\\\CUDA\\\\v10.0', 'DRIVERDATA': 'C:\\\\Windows\\\\System32\\\\Drivers\\\\DriverData', 'HOMEDRIVE': 'C:', 'HOMEPATH': '\\\\Users\\\\文远', 'JAVA_HOME': 'C:\\\\Program Files\\\\Java\\\\jdk1.8.0_191', 'LINGO_12_LICENSE_FILE': 'E:\\\\软件\\\\lndlng12.lic;E:\\\\BP_lingo\\\\Lingo12\\\\lndlng12.lic', 'LOCALAPPDATA': 'C:\\\\Users\\\\文远\\\\AppData\\\\Local', 'LOGONSERVER': '\\\\\\\\文远', 'NUMBER_OF_PROCESSORS': '8', 'NVCUDASAMPLES10_0_ROOT': 'C:\\\\ProgramData\\\\NVIDIA Corporation\\\\CUDA Samples\\\\v10.0', 'NVCUDASAMPLES_ROOT': 'C:\\\\ProgramData\\\\NVIDIA Corporation\\\\CUDA Samples\\\\v10.0', 'ONEDRIVE': 'C:\\\\Users\\\\文远\\\\OneDrive', 'ONEDRIVECONSUMER': 'C:\\\\Users\\\\文远\\\\OneDrive', 'ONLINESERVICES': 'Online Services', 'OS': 'Windows_NT', 'PATH': 'E:\\\\PYTHON\\\\Anaconda\\\\envs\\\\pytorch;E:\\\\PYTHON\\\\Anaconda\\\\envs\\\\pytorch\\\\Library\\\\mingw-w64\\\\bin;E:\\\\PYTHON\\\\Anaconda\\\\envs\\\\pytorch\\\\Library\\\\usr\\\\bin;E:\\\\PYTHON\\\\Anaconda\\\\envs\\\\pytorch\\\\Library\\\\bin;E:\\\\PYTHON\\\\Anaconda\\\\envs\\\\pytorch\\\\Scripts;C:\\\\Program Files (x86)\\\\NVIDIA Corporation\\\\PhysX\\\\Common;C:\\\\Program Files\\\\NVIDIA GPU Computing Toolkit\\\\CUDA\\\\v10.0\\\\bin;C:\\\\Program Files\\\\NVIDIA GPU Computing Toolkit\\\\CUDA\\\\v10.0\\\\libnvvp;C:\\\\Program Files\\\\Java\\\\jdk1.8.0_191\\\\bin;C:\\\\Program Files\\\\Java\\\\jdk1.8.0_191\\\\jre\\\\bin;C:\\\\Program Files (x86)\\\\Common Files\\\\Oracle\\\\Java\\\\javapath;C:\\\\windows\\\\system32;C:\\\\windows;C:\\\\windows\\\\System32\\\\Wbem;C:\\\\windows\\\\System32\\\\WindowsPowerShell\\\\v1.0\\\\;C:\\\\WINDOWS\\\\system32;C:\\\\WINDOWS;C:\\\\WINDOWS\\\\System32\\\\Wbem;C:\\\\WINDOWS\\\\System32\\\\WindowsPowerShell\\\\v1.0\\\\;C:\\\\WINDOWS\\\\System32\\\\OpenSSH\\\\;C:\\\\Program Files\\\\Microsoft SQL Server\\\\130\\\\Tools\\\\Binn\\\\;C:\\\\Program Files (x86)\\\\Intel\\\\Intel(R) Management Engine Components\\\\DAL;C:\\\\Program Files\\\\Intel\\\\Intel(R) Management Engine Components\\\\DAL;C:\\\\Program Files\\\\Intel\\\\WiFi\\\\bin\\\\;C:\\\\Program Files\\\\Common Files\\\\Intel\\\\WirelessCommon\\\\;C:\\\\Program Files\\\\Microsoft SQL Server\\\\Client SDK\\\\ODBC\\\\110\\\\Tools\\\\Binn\\\\;C:\\\\Program Files (x86)\\\\Microsoft SQL Server\\\\120\\\\Tools\\\\Binn\\\\;C:\\\\Program Files\\\\Microsoft SQL Server\\\\120\\\\Tools\\\\Binn\\\\;C:\\\\Program Files\\\\Microsoft SQL Server\\\\120\\\\DTS\\\\Binn\\\\;C:\\\\Program Files (x86)\\\\Windows Kits\\\\8.1\\\\Windows Performance Toolkit\\\\;E:\\\\CVI_app\\\\Windows Performance Toolkit\\\\;E:\\\\软件\\\\;E;\\\\BP_lingo\\\\Lingo12\\\\;E:\\\\matlab__a\\\\runtime\\\\win64;E:\\\\matlab__a\\\\bin;E:\\\\软件\\\\git_app\\\\Git\\\\cmd;E:\\\\Node_js\\\\Node_app\\\\;E:\\\\Cmake\\\\bin;C:\\\\Users\\\\文远\\\\AppData\\\\Local\\\\Programs\\\\Python\\\\Python38\\\\Scripts\\\\;C:\\\\Users\\\\文远\\\\AppData\\\\Local\\\\Programs\\\\Python\\\\Python38\\\\;E:\\\\Anadonate;E:\\\\Anadonate\\\\Library\\\\mingw-w64\\\\bin;E:\\\\Anadonate\\\\Library\\\\usr\\\\bin;E:\\\\Anadonate\\\\Library\\\\bin;E:\\\\Anadonate\\\\Scripts;C:\\\\Users\\\\文远\\\\AppData\\\\Local\\\\Microsoft\\\\WindowsApps;E:\\\\语言\\\\pycharm\\\\python\\\\PyCharm 2019.1.3\\\\bin;;E:\\\\PYTHON\\\\Pycharm\\\\PyCharm Community Edition 2019.1.1\\\\bin;;C:\\\\Users\\\\文远\\\\AppData\\\\Local\\\\Programs\\\\Microsoft VS Code\\\\bin;E:\\\\Movie_VIP\\\\ffmpeg_app\\\\ffmpeg-20200504-5767a2e-win64-static\\\\bin;C:\\\\Users\\\\文远\\\\AppData\\\\Roaming\\\\npm', 'PATHEXT': '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC', 'PLATFORMCODE': 'AN', 'PROCESSOR_ARCHITECTURE': 'AMD64', 'PROCESSOR_IDENTIFIER': 'Intel64 Family 6 Model 142 Stepping 10, GenuineIntel', 'PROCESSOR_LEVEL': '6', 'PROCESSOR_REVISION': '8e0a', 'PROGRAMDATA': 'C:\\\\ProgramData', 'PROGRAMFILES': 'C:\\\\Program Files', 'PROGRAMFILES(X86)': 'C:\\\\Program Files (x86)', 'PROGRAMW6432': 'C:\\\\Program Files', 'PSMODULEPATH': 'C:\\\\Program Files\\\\WindowsPowerShell\\\\Modules;C:\\\\WINDOWS\\\\system32\\\\WindowsPowerShell\\\\v1.0\\\\Modules;C:\\\\Program Files (x86)\\\\Microsoft SQL Server\\\\120\\\\Tools\\\\PowerShell\\\\Modules\\\\', 'PTSMINSTALLPATH': 'c:\\\\Program Files\\\\HP\\\\HP ProtectTools Security Manager\\\\Bin\\\\', 'PTSMINSTALLPATH_X86': 'c:\\\\Program Files (x86)\\\\HP\\\\HP ProtectTools Security Manager\\\\Bin\\\\', 'PUBLIC': 'C:\\\\Users\\\\Public', 'PYCHARM': 'E:\\\\语言\\\\pycharm\\\\python\\\\PyCharm 2019.1.3\\\\bin;', 'PYCHARM COMMUNITY EDITION': 'E:\\\\PYTHON\\\\Pycharm\\\\PyCharm Community Edition 2019.1.1\\\\bin;', 'REGIONCODE': 'APJ', 'SESSIONNAME': 'Console', 'SW_SIM_HYDRA': 'C:\\\\Program Files\\\\Common Files\\\\SolidWorks Shared\\\\Simulation Worker Agent\\\\', 'SW_SIM_MPIT': 'INTELMPI', 'SW_SIM_TEMP': 'C:\\\\ProgramData\\\\SOLIDWORKS\\\\SW_net_sim_temp\\\\', 'SYSTEMDRIVE': 'C:', 'SYSTEMROOT': 'C:\\\\WINDOWS', 'TEMP': 'C:\\\\Users\\\\文远\\\\AppData\\\\Local\\\\Temp', 'TMP': 'C:\\\\Users\\\\文远\\\\AppData\\\\Local\\\\Temp', 'USERDOMAIN': '文远', 'USERDOMAIN_ROAMINGPROFILE': '文远', 'USERNAME': '文远', 'USERPROFILE': 'C:\\\\Users\\\\文远', 'VS140COMNTOOLS': 'E:\\\\软件\\\\VS_app\\\\Common7\\\\Tools\\\\', 'WINDIR': 'C:\\\\WINDOWS', 'CONDA_PREFIX': 'E:\\\\PYTHON\\\\Anaconda\\\\envs\\\\pytorch', 'JPY_INTERRUPT_EVENT': '1860', 'IPY_INTERRUPT_EVENT': '1860', 'JPY_PARENT_PID': '2020', 'TERM': 'xterm-color', 'CLICOLOR': '1', 'PAGER': 'cat', 'GIT_PAGER': 'cat', 'MPLBACKEND': 'module://ipykernel.pylab.backend_inline'})environ({'ALLUSERSPROFILE': 'C:\\\\ProgramData', 'APPDATA': 'C:\\\\Users\\\\文远\\\\AppData\\\\Roaming', 'CLASSPATH': '.;C:\\\\Program Files\\\\Java\\\\jdk1.8.0_191\\\\bin;C:\\\\Program Files\\\\Java\\\\jdk1.8.0_191\\\\lib\\\\dt.jar;C:\\\\Program Files\\\\Java\\\\jdk1.8.0_191\\\\lib\\\\tools.jar;E:\\\\软件\\\\Lingo12.jar;E:\\\\BP_lingo\\\\Lingo12\\\\Lingo12.jar', 'COMMONPROGRAMFILES': 'C:\\\\Program Files\\\\Common Files', 'COMMONPROGRAMFILES(X86)': 'C:\\\\Program Files (x86)\\\\Common Files', 'COMMONPROGRAMW6432': 'C:\\\\Program Files\\\\Common Files', 'COMPUTERNAME': '文远', 'COMSPEC': 'C:\\\\WINDOWS\\\\system32\\\\cmd.exe', 'CUDA_PATH': 'C:\\\\Program Files\\\\NVIDIA GPU Computing Toolkit\\\\CUDA\\\\v10.0', 'CUDA_PATH_V10_0': 'C:\\\\Program Files\\\\NVIDIA GPU Computing Toolkit\\\\CUDA\\\\v10.0', 'DRIVERDATA': 'C:\\\\Windows\\\\System32\\\\Drivers\\\\DriverData', 'HOMEDRIVE': 'C:', 'HOMEPATH': '\\\\Users\\\\文远', 'JAVA_HOME': 'C:\\\\Program Files\\\\Java\\\\jdk1.8.0_191', 'LINGO_12_LICENSE_FILE': 'E:\\\\软件\\\\lndlng12.lic;E:\\\\BP_lingo\\\\Lingo12\\\\lndlng12.lic', 'LOCALAPPDATA': 'C:\\\\Users\\\\文远\\\\AppData\\\\Local', 'LOGONSERVER': '\\\\\\\\文远', 'NUMBER_OF_PROCESSORS': '8', 'NVCUDASAMPLES10_0_ROOT': 'C:\\\\ProgramData\\\\NVIDIA Corporation\\\\CUDA Samples\\\\v10.0', 'NVCUDASAMPLES_ROOT': 'C:\\\\ProgramData\\\\NVIDIA Corporation\\\\CUDA Samples\\\\v10.0', 'ONEDRIVE': 'C:\\\\Users\\\\文远\\\\OneDrive', 'ONEDRIVECONSUMER': 'C:\\\\Users\\\\文远\\\\OneDrive', 'ONLINESERVICES': 'Online Services', 'OS': 'Windows_NT', 'PATH': 'E:\\\\PYTHON\\\\Anaconda\\\\envs\\\\pytorch;E:\\\\PYTHON\\\\Anaconda\\\\envs\\\\pytorch\\\\Library\\\\mingw-w64\\\\bin;E:\\\\PYTHON\\\\Anaconda\\\\envs\\\\pytorch\\\\Library\\\\usr\\\\bin;E:\\\\PYTHON\\\\Anaconda\\\\envs\\\\pytorch\\\\Library\\\\bin;E:\\\\PYTHON\\\\Anaconda\\\\envs\\\\pytorch\\\\Scripts;C:\\\\Program Files (x86)\\\\NVIDIA Corporation\\\\PhysX\\\\Common;C:\\\\Program Files\\\\NVIDIA GPU Computing Toolkit\\\\CUDA\\\\v10.0\\\\bin;C:\\\\Program Files\\\\NVIDIA GPU Computing Toolkit\\\\CUDA\\\\v10.0\\\\libnvvp;C:\\\\Program Files\\\\Java\\\\jdk1.8.0_191\\\\bin;C:\\\\Program Files\\\\Java\\\\jdk1.8.0_191\\\\jre\\\\bin;C:\\\\Program Files (x86)\\\\Common Files\\\\Oracle\\\\Java\\\\javapath;C:\\\\windows\\\\system32;C:\\\\windows;C:\\\\windows\\\\System32\\\\Wbem;C:\\\\windows\\\\System32\\\\WindowsPowerShell\\\\v1.0\\\\;C:\\\\WINDOWS\\\\system32;C:\\\\WINDOWS;C:\\\\WINDOWS\\\\System32\\\\Wbem;C:\\\\WINDOWS\\\\System32\\\\WindowsPowerShell\\\\v1.0\\\\;C:\\\\WINDOWS\\\\System32\\\\OpenSSH\\\\;C:\\\\Program Files\\\\Microsoft SQL Server\\\\130\\\\Tools\\\\Binn\\\\;C:\\\\Program Files (x86)\\\\Intel\\\\Intel(R) Management Engine Components\\\\DAL;C:\\\\Program Files\\\\Intel\\\\Intel(R) Management Engine Components\\\\DAL;C:\\\\Program Files\\\\Intel\\\\WiFi\\\\bin\\\\;C:\\\\Program Files\\\\Common Files\\\\Intel\\\\WirelessCommon\\\\;C:\\\\Program Files\\\\Microsoft SQL Server\\\\Client SDK\\\\ODBC\\\\110\\\\Tools\\\\Binn\\\\;C:\\\\Program Files (x86)\\\\Microsoft SQL Server\\\\120\\\\Tools\\\\Binn\\\\;C:\\\\Program Files\\\\Microsoft SQL Server\\\\120\\\\Tools\\\\Binn\\\\;C:\\\\Program Files\\\\Microsoft SQL Server\\\\120\\\\DTS\\\\Binn\\\\;C:\\\\Program Files (x86)\\\\Windows Kits\\\\8.1\\\\Windows Performance Toolkit\\\\;E:\\\\CVI_app\\\\Windows Performance Toolkit\\\\;E:\\\\软件\\\\;E;\\\\BP_lingo\\\\Lingo12\\\\;E:\\\\matlab__a\\\\runtime\\\\win64;E:\\\\matlab__a\\\\bin;E:\\\\软件\\\\git_app\\\\Git\\\\cmd;E:\\\\Node_js\\\\Node_app\\\\;E:\\\\Cmake\\\\bin;C:\\\\Users\\\\文远\\\\AppData\\\\Local\\\\Programs\\\\Python\\\\Python38\\\\Scripts\\\\;C:\\\\Users\\\\文远\\\\AppData\\\\Local\\\\Programs\\\\Python\\\\Python38\\\\;E:\\\\Anadonate;E:\\\\Anadonate\\\\Library\\\\mingw-w64\\\\bin;E:\\\\Anadonate\\\\Library\\\\usr\\\\bin;E:\\\\Anadonate\\\\Library\\\\bin;E:\\\\Anadonate\\\\Scripts;C:\\\\Users\\\\文远\\\\AppData\\\\Local\\\\Microsoft\\\\WindowsApps;E:\\\\语言\\\\pycharm\\\\python\\\\PyCharm 2019.1.3\\\\bin;;E:\\\\PYTHON\\\\Pycharm\\\\PyCharm Community Edition 2019.1.1\\\\bin;;C:\\\\Users\\\\文远\\\\AppData\\\\Local\\\\Programs\\\\Microsoft VS Code\\\\bin;E:\\\\Movie_VIP\\\\ffmpeg_app\\\\ffmpeg-20200504-5767a2e-win64-static\\\\bin;C:\\\\Users\\\\文远\\\\AppData\\\\Roaming\\\\npm', 'PATHEXT': '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC', 'PLATFORMCODE': 'AN', 'PROCESSOR_ARCHITECTURE': 'AMD64', 'PROCESSOR_IDENTIFIER': 'Intel64 Family 6 Model 142 Stepping 10, GenuineIntel', 'PROCESSOR_LEVEL': '6', 'PROCESSOR_REVISION': '8e0a', 'PROGRAMDATA': 'C:\\\\ProgramData', 'PROGRAMFILES': 'C:\\\\Program Files', 'PROGRAMFILES(X86)': 'C:\\\\Program Files (x86)', 'PROGRAMW6432': 'C:\\\\Program Files', 'PSMODULEPATH': 'C:\\\\Program Files\\\\WindowsPowerShell\\\\Modules;C:\\\\WINDOWS\\\\system32\\\\WindowsPowerShell\\\\v1.0\\\\Modules;C:\\\\Program Files (x86)\\\\Microsoft SQL Server\\\\120\\\\Tools\\\\PowerShell\\\\Modules\\\\', 'PTSMINSTALLPATH': 'c:\\\\Program Files\\\\HP\\\\HP ProtectTools Security Manager\\\\Bin\\\\', 'PTSMINSTALLPATH_X86': 'c:\\\\Program Files (x86)\\\\HP\\\\HP ProtectTools Security Manager\\\\Bin\\\\', 'PUBLIC': 'C:\\\\Users\\\\Public', 'PYCHARM': 'E:\\\\语言\\\\pycharm\\\\python\\\\PyCharm 2019.1.3\\\\bin;', 'PYCHARM COMMUNITY EDITION': 'E:\\\\PYTHON\\\\Pycharm\\\\PyCharm Community Edition 2019.1.1\\\\bin;', 'REGIONCODE': 'APJ', 'SESSIONNAME': 'Console', 'SW_SIM_HYDRA': 'C:\\\\Program Files\\\\Common Files\\\\SolidWorks Shared\\\\Simulation Worker Agent\\\\', 'SW_SIM_MPIT': 'INTELMPI', 'SW_SIM_TEMP': 'C:\\\\ProgramData\\\\SOLIDWORKS\\\\SW_net_sim_temp\\\\', 'SYSTEMDRIVE': 'C:', 'SYSTEMROOT': 'C:\\\\WINDOWS', 'TEMP': 'C:\\\\Users\\\\文远\\\\AppData\\\\Local\\\\Temp', 'TMP': 'C:\\\\Users\\\\文远\\\\AppData\\\\Local\\\\Temp', 'USERDOMAIN': '文远', 'USERDOMAIN_ROAMINGPROFILE': '文远', 'USERNAME': '文远', 'USERPROFILE': 'C:\\\\Users\\\\文远', 'VS140COMNTOOLS': 'E:\\\\软件\\\\VS_app\\\\Common7\\\\Tools\\\\', 'WINDIR': 'C:\\\\WINDOWS', 'CONDA_PREFIX': 'E:\\\\PYTHON\\\\Anaconda\\\\envs\\\\pytorch', 'JPY_INTERRUPT_EVENT': '1860', 'IPY_INTERRUPT_EVENT': '1860', 'JPY_PARENT_PID': '2020', 'TERM': 'xterm-color', 'CLICOLOR': '1', 'PAGER': 'cat', 'GIT_PAGER': 'cat', 'MPLBACKEND': 'module://ipykernel.pylab.backend_inline'})environ({'ALLUSERSPROFILE': 'C:\\\\ProgramData', 'APPDATA': 'C:\\\\Users\\\\文远\\\\AppData\\\\Roaming', 'CLASSPATH': '.;C:\\\\Program Files\\\\Java\\\\jdk1.8.0_191\\\\bin;C:\\\\Program Files\\\\Java\\\\jdk1.8.0_191\\\\lib\\\\dt.jar;C:\\\\Program Files\\\\Java\\\\jdk1.8.0_191\\\\lib\\\\tools.jar;E:\\\\软件\\\\Lingo12.jar;E:\\\\BP_lingo\\\\Lingo12\\\\Lingo12.jar', 'COMMONPROGRAMFILES': 'C:\\\\Program Files\\\\Common Files', 'COMMONPROGRAMFILES(X86)': 'C:\\\\Program Files (x86)\\\\Common Files', 'COMMONPROGRAMW6432': 'C:\\\\Program Files\\\\Common Files', 'COMPUTERNAME': '文远', 'COMSPEC': 'C:\\\\WINDOWS\\\\system32\\\\cmd.exe', 'CUDA_PATH': 'C:\\\\Program Files\\\\NVIDIA GPU Computing Toolkit\\\\CUDA\\\\v10.0', 'CUDA_PATH_V10_0': 'C:\\\\Program Files\\\\NVIDIA GPU Computing Toolkit\\\\CUDA\\\\v10.0', 'DRIVERDATA': 'C:\\\\Windows\\\\System32\\\\Drivers\\\\DriverData', 'HOMEDRIVE': 'C:', 'HOMEPATH': '\\\\Users\\\\文远', 'JAVA_HOME': 'C:\\\\Program Files\\\\Java\\\\jdk1.8.0_191', 'LINGO_12_LICENSE_FILE': 'E:\\\\软件\\\\lndlng12.lic;E:\\\\BP_lingo\\\\Lingo12\\\\lndlng12.lic', 'LOCALAPPDATA': 'C:\\\\Users\\\\文远\\\\AppData\\\\Local', 'LOGONSERVER': '\\\\\\\\文远', 'NUMBER_OF_PROCESSORS': '8', 'NVCUDASAMPLES10_0_ROOT': 'C:\\\\ProgramData\\\\NVIDIA Corporation\\\\CUDA Samples\\\\v10.0', 'NVCUDASAMPLES_ROOT': 'C:\\\\ProgramData\\\\NVIDIA Corporation\\\\CUDA Samples\\\\v10.0', 'ONEDRIVE': 'C:\\\\Users\\\\文远\\\\OneDrive', 'ONEDRIVECONSUMER': 'C:\\\\Users\\\\文远\\\\OneDrive', 'ONLINESERVICES': 'Online Services', 'OS': 'Windows_NT', 'PATH': 'E:\\\\PYTHON\\\\Anaconda\\\\envs\\\\pytorch;E:\\\\PYTHON\\\\Anaconda\\\\envs\\\\pytorch\\\\Library\\\\mingw-w64\\\\bin;E:\\\\PYTHON\\\\Anaconda\\\\envs\\\\pytorch\\\\Library\\\\usr\\\\bin;E:\\\\PYTHON\\\\Anaconda\\\\envs\\\\pytorch\\\\Library\\\\bin;E:\\\\PYTHON\\\\Anaconda\\\\envs\\\\pytorch\\\\Scripts;C:\\\\Program Files (x86)\\\\NVIDIA Corporation\\\\PhysX\\\\Common;C:\\\\Program Files\\\\NVIDIA GPU Computing Toolkit\\\\CUDA\\\\v10.0\\\\bin;C:\\\\Program Files\\\\NVIDIA GPU Computing Toolkit\\\\CUDA\\\\v10.0\\\\libnvvp;C:\\\\Program Files\\\\Java\\\\jdk1.8.0_191\\\\bin;C:\\\\Program Files\\\\Java\\\\jdk1.8.0_191\\\\jre\\\\bin;C:\\\\Program Files (x86)\\\\Common Files\\\\Oracle\\\\Java\\\\javapath;C:\\\\windows\\\\system32;C:\\\\windows;C:\\\\windows\\\\System32\\\\Wbem;C:\\\\windows\\\\System32\\\\WindowsPowerShell\\\\v1.0\\\\;C:\\\\WINDOWS\\\\system32;C:\\\\WINDOWS;C:\\\\WINDOWS\\\\System32\\\\Wbem;C:\\\\WINDOWS\\\\System32\\\\WindowsPowerShell\\\\v1.0\\\\;C:\\\\WINDOWS\\\\System32\\\\OpenSSH\\\\;C:\\\\Program Files\\\\Microsoft SQL Server\\\\130\\\\Tools\\\\Binn\\\\;C:\\\\Program Files (x86)\\\\Intel\\\\Intel(R) Management Engine Components\\\\DAL;C:\\\\Program Files\\\\Intel\\\\Intel(R) Management Engine Components\\\\DAL;C:\\\\Program Files\\\\Intel\\\\WiFi\\\\bin\\\\;C:\\\\Program Files\\\\Common Files\\\\Intel\\\\WirelessCommon\\\\;C:\\\\Program Files\\\\Microsoft SQL Server\\\\Client SDK\\\\ODBC\\\\110\\\\Tools\\\\Binn\\\\;C:\\\\Program Files (x86)\\\\Microsoft SQL Server\\\\120\\\\Tools\\\\Binn\\\\;C:\\\\Program Files\\\\Microsoft SQL Server\\\\120\\\\Tools\\\\Binn\\\\;C:\\\\Program Files\\\\Microsoft SQL Server\\\\120\\\\DTS\\\\Binn\\\\;C:\\\\Program Files (x86)\\\\Windows Kits\\\\8.1\\\\Windows Performance Toolkit\\\\;E:\\\\CVI_app\\\\Windows Performance Toolkit\\\\;E:\\\\软件\\\\;E;\\\\BP_lingo\\\\Lingo12\\\\;E:\\\\matlab__a\\\\runtime\\\\win64;E:\\\\matlab__a\\\\bin;E:\\\\软件\\\\git_app\\\\Git\\\\cmd;E:\\\\Node_js\\\\Node_app\\\\;E:\\\\Cmake\\\\bin;C:\\\\Users\\\\文远\\\\AppData\\\\Local\\\\Programs\\\\Python\\\\Python38\\\\Scripts\\\\;C:\\\\Users\\\\文远\\\\AppData\\\\Local\\\\Programs\\\\Python\\\\Python38\\\\;E:\\\\Anadonate;E:\\\\Anadonate\\\\Library\\\\mingw-w64\\\\bin;E:\\\\Anadonate\\\\Library\\\\usr\\\\bin;E:\\\\Anadonate\\\\Library\\\\bin;E:\\\\Anadonate\\\\Scripts;C:\\\\Users\\\\文远\\\\AppData\\\\Local\\\\Microsoft\\\\WindowsApps;E:\\\\语言\\\\pycharm\\\\python\\\\PyCharm 2019.1.3\\\\bin;;E:\\\\PYTHON\\\\Pycharm\\\\PyCharm Community Edition 2019.1.1\\\\bin;;C:\\\\Users\\\\文远\\\\AppData\\\\Local\\\\Programs\\\\Microsoft VS Code\\\\bin;E:\\\\Movie_VIP\\\\ffmpeg_app\\\\ffmpeg-20200504-5767a2e-win64-static\\\\bin;C:\\\\Users\\\\文远\\\\AppData\\\\Roaming\\\\npm', 'PATHEXT': '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC', 'PLATFORMCODE': 'AN', 'PROCESSOR_ARCHITECTURE': 'AMD64', 'PROCESSOR_IDENTIFIER': 'Intel64 Family 6 Model 142 Stepping 10, GenuineIntel', 'PROCESSOR_LEVEL': '6', 'PROCESSOR_REVISION': '8e0a', 'PROGRAMDATA': 'C:\\\\ProgramData', 'PROGRAMFILES': 'C:\\\\Program Files', 'PROGRAMFILES(X86)': 'C:\\\\Program Files (x86)', 'PROGRAMW6432': 'C:\\\\Program Files', 'PSMODULEPATH': 'C:\\\\Program Files\\\\WindowsPowerShell\\\\Modules;C:\\\\WINDOWS\\\\system32\\\\WindowsPowerShell\\\\v1.0\\\\Modules;C:\\\\Program Files (x86)\\\\Microsoft SQL Server\\\\120\\\\Tools\\\\PowerShell\\\\Modules\\\\', 'PTSMINSTALLPATH': 'c:\\\\Program Files\\\\HP\\\\HP ProtectTools Security Manager\\\\Bin\\\\', 'PTSMINSTALLPATH_X86': 'c:\\\\Program Files (x86)\\\\HP\\\\HP ProtectTools Security Manager\\\\Bin\\\\', 'PUBLIC': 'C:\\\\Users\\\\Public', 'PYCHARM': 'E:\\\\语言\\\\pycharm\\\\python\\\\PyCharm 2019.1.3\\\\bin;', 'PYCHARM COMMUNITY EDITION': 'E:\\\\PYTHON\\\\Pycharm\\\\PyCharm Community Edition 2019.1.1\\\\bin;', 'REGIONCODE': 'APJ', 'SESSIONNAME': 'Console', 'SW_SIM_HYDRA': 'C:\\\\Program Files\\\\Common Files\\\\SolidWorks Shared\\\\Simulation Worker Agent\\\\', 'SW_SIM_MPIT': 'INTELMPI', 'SW_SIM_TEMP': 'C:\\\\ProgramData\\\\SOLIDWORKS\\\\SW_net_sim_temp\\\\', 'SYSTEMDRIVE': 'C:', 'SYSTEMROOT': 'C:\\\\WINDOWS', 'TEMP': 'C:\\\\Users\\\\文远\\\\AppData\\\\Local\\\\Temp', 'TMP': 'C:\\\\Users\\\\文远\\\\AppData\\\\Local\\\\Temp', 'USERDOMAIN': '文远', 'USERDOMAIN_ROAMINGPROFILE': '文远', 'USERNAME': '文远', 'USERPROFILE': 'C:\\\\Users\\\\文远', 'VS140COMNTOOLS': 'E:\\\\软件\\\\VS_app\\\\Common7\\\\Tools\\\\', 'WINDIR': 'C:\\\\WINDOWS', 'CONDA_PREFIX': 'E:\\\\PYTHON\\\\Anaconda\\\\envs\\\\pytorch', 'JPY_INTERRUPT_EVENT': '1860', 'IPY_INTERRUPT_EVENT': '1860', 'JPY_PARENT_PID': '2020', 'TERM': 'xterm-color', 'CLICOLOR': '1', 'PAGER': 'cat', 'GIT_PAGER': 'cat', 'MPLBACKEND': 'module://ipykernel.pylab.backend_inline'}).github.io/\""
      ]
     },
     "execution_count": 54,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# mm=\n",
    "re.sub(r'\\d',string,url)\n",
    "# len(mm)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 98,
   "metadata": {},
   "outputs": [],
   "source": [
    "zz=re.finditer(r'\\d',url)        #???????"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 99,
   "metadata": {},
   "outputs": [],
   "source": [
    "word=list(zz)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 100,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[<_sre.SRE_Match object; span=(16, 17), match='6'>, <_sre.SRE_Match object; span=(17, 18), match='6'>, <_sre.SRE_Match object; span=(18, 19), match='6'>]\n"
     ]
    }
   ],
   "source": [
    "print(word)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 78,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "3"
      ]
     },
     "execution_count": 78,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "type(word)\n",
    "len(word)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 75,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "_sre.SRE_Match"
      ]
     },
     "execution_count": 75,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "type(word[1])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 81,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<function SRE_Match.span(group=0, /)>"
      ]
     },
     "execution_count": 81,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "word[1].span"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 85,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "d\\nsi\\nd\n",
      "d\n",
      "si\n",
      "d\n"
     ]
    }
   ],
   "source": [
    "# 原生字符串\n",
    "print(r'd\\nsi\\nd')\n",
    "print('d\\nsi\\nd')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 90,
   "metadata": {},
   "outputs": [],
   "source": [
    "import re "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 91,
   "metadata": {},
   "outputs": [],
   "source": [
    "res1=re.findall(r'\\d+','123+223-33,22,11')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 92,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['123', '223', '33', '22', '11']"
      ]
     },
     "execution_count": 92,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "res1\n",
    "#干的漂亮"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 97,
   "metadata": {},
   "outputs": [
    {
     "ename": "error",
     "evalue": "bad character in group name 'tag_name)' at position 5",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31merror\u001b[0m                                     Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-97-5c1a9b2fc5ec>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mres2\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mre\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0msearch\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"<(?P<tag_name)>\\w+)>\\w+/(?P=tag_name)>\"\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;34m\"<hl>hello</hl>\"\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m      2\u001b[0m \u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mres2\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mE:\\PYTHON\\Anaconda\\envs\\pytorch\\lib\\re.py\u001b[0m in \u001b[0;36msearch\u001b[1;34m(pattern, string, flags)\u001b[0m\n\u001b[0;32m    180\u001b[0m     \"\"\"Scan through string looking for a match to the pattern, returning\n\u001b[0;32m    181\u001b[0m     a match object, or None if no match was found.\"\"\"\n\u001b[1;32m--> 182\u001b[1;33m     \u001b[1;32mreturn\u001b[0m \u001b[0m_compile\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mpattern\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mflags\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0msearch\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mstring\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    183\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    184\u001b[0m \u001b[1;32mdef\u001b[0m \u001b[0msub\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mpattern\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mrepl\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mstring\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mcount\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;36m0\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mflags\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;36m0\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mE:\\PYTHON\\Anaconda\\envs\\pytorch\\lib\\re.py\u001b[0m in \u001b[0;36m_compile\u001b[1;34m(pattern, flags)\u001b[0m\n\u001b[0;32m    299\u001b[0m     \u001b[1;32mif\u001b[0m \u001b[1;32mnot\u001b[0m \u001b[0msre_compile\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0misstring\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mpattern\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    300\u001b[0m         \u001b[1;32mraise\u001b[0m \u001b[0mTypeError\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"first argument must be string or compiled pattern\"\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 301\u001b[1;33m     \u001b[0mp\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0msre_compile\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mcompile\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mpattern\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mflags\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    302\u001b[0m     \u001b[1;32mif\u001b[0m \u001b[1;32mnot\u001b[0m \u001b[1;33m(\u001b[0m\u001b[0mflags\u001b[0m \u001b[1;33m&\u001b[0m \u001b[0mDEBUG\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    303\u001b[0m         \u001b[1;32mif\u001b[0m \u001b[0mlen\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0m_cache\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;33m>=\u001b[0m \u001b[0m_MAXCACHE\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mE:\\PYTHON\\Anaconda\\envs\\pytorch\\lib\\sre_compile.py\u001b[0m in \u001b[0;36mcompile\u001b[1;34m(p, flags)\u001b[0m\n\u001b[0;32m    560\u001b[0m     \u001b[1;32mif\u001b[0m \u001b[0misstring\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mp\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    561\u001b[0m         \u001b[0mpattern\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mp\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 562\u001b[1;33m         \u001b[0mp\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0msre_parse\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mparse\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mp\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mflags\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    563\u001b[0m     \u001b[1;32melse\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    564\u001b[0m         \u001b[0mpattern\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;32mNone\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mE:\\PYTHON\\Anaconda\\envs\\pytorch\\lib\\sre_parse.py\u001b[0m in \u001b[0;36mparse\u001b[1;34m(str, flags, pattern)\u001b[0m\n\u001b[0;32m    853\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    854\u001b[0m     \u001b[1;32mtry\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 855\u001b[1;33m         \u001b[0mp\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0m_parse_sub\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0msource\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mpattern\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mflags\u001b[0m \u001b[1;33m&\u001b[0m \u001b[0mSRE_FLAG_VERBOSE\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;36m0\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    856\u001b[0m     \u001b[1;32mexcept\u001b[0m \u001b[0mVerbose\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    857\u001b[0m         \u001b[1;31m# the VERBOSE flag was switched on inside the pattern.  to be\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mE:\\PYTHON\\Anaconda\\envs\\pytorch\\lib\\sre_parse.py\u001b[0m in \u001b[0;36m_parse_sub\u001b[1;34m(source, state, verbose, nested)\u001b[0m\n\u001b[0;32m    414\u001b[0m     \u001b[1;32mwhile\u001b[0m \u001b[1;32mTrue\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    415\u001b[0m         itemsappend(_parse(source, state, verbose, nested + 1,\n\u001b[1;32m--> 416\u001b[1;33m                            not nested and not items))\n\u001b[0m\u001b[0;32m    417\u001b[0m         \u001b[1;32mif\u001b[0m \u001b[1;32mnot\u001b[0m \u001b[0msourcematch\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"|\"\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    418\u001b[0m             \u001b[1;32mbreak\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mE:\\PYTHON\\Anaconda\\envs\\pytorch\\lib\\sre_parse.py\u001b[0m in \u001b[0;36m_parse\u001b[1;34m(source, state, verbose, nested, first)\u001b[0m\n\u001b[0;32m    645\u001b[0m                         \u001b[1;32mif\u001b[0m \u001b[1;32mnot\u001b[0m \u001b[0mname\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0misidentifier\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    646\u001b[0m                             \u001b[0mmsg\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;34m\"bad character in group name %r\"\u001b[0m \u001b[1;33m%\u001b[0m \u001b[0mname\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 647\u001b[1;33m                             \u001b[1;32mraise\u001b[0m \u001b[0msource\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0merror\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mmsg\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mlen\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mname\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;33m+\u001b[0m \u001b[1;36m1\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    648\u001b[0m                     \u001b[1;32melif\u001b[0m \u001b[0msourcematch\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"=\"\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    649\u001b[0m                         \u001b[1;31m# named backreference\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;31merror\u001b[0m: bad character in group name 'tag_name)' at position 5"
     ]
    }
   ],
   "source": [
    "# ????\n",
    "\n",
    "res2=re.search(\"<(?P<tag_name)>\\w+)>\\w+/(?P=tag_name)>\",\"<hl>hello</hl>\")\n",
    "print(res2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 101,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<_sre.SRE_Match object; span=(16, 17), match='6'>,\n",
       " <_sre.SRE_Match object; span=(17, 18), match='6'>,\n",
       " <_sre.SRE_Match object; span=(18, 19), match='6'>]"
      ]
     },
     "execution_count": 101,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "word"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 104,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "str"
      ]
     },
     "execution_count": 104,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "type(word[0].group())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 106,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<_sre.SRE_Match object; span=(0, 1), match='a'>"
      ]
     },
     "execution_count": 106,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "re.match('a',\"abc\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 109,
   "metadata": {},
   "outputs": [],
   "source": [
    "res5=re.match(\"b\",\"abc\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 111,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "None\n"
     ]
    }
   ],
   "source": [
    "print(res5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 112,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<_sre.SRE_Match object; span=(1, 2), match='b'>"
      ]
     },
     "execution_count": 112,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "re.search(\"b\",\"abc\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 114,
   "metadata": {},
   "outputs": [],
   "source": [
    "res6=re.search(\"^b\",\"abc\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 116,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "None\n"
     ]
    }
   ],
   "source": [
    "print(res6)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 117,
   "metadata": {},
   "outputs": [],
   "source": [
    "res7=re.search(\"$b\",\"abc\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 118,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "None\n"
     ]
    }
   ],
   "source": [
    "print(res7)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 125,
   "metadata": {},
   "outputs": [],
   "source": [
    "res8=re.search(\"c$\",\"abc\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 126,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<_sre.SRE_Match object; span=(2, 3), match='c'>\n"
     ]
    }
   ],
   "source": [
    "print(res8)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 127,
   "metadata": {},
   "outputs": [],
   "source": [
    "re.search(\"$c\",\"abc\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 129,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<_sre.SRE_Match object; span=(2, 3), match='c'>"
      ]
     },
     "execution_count": 129,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "re.search(\"c$\",\"abc\")\n",
    "### 干的漂亮"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 关于pattern的匹配首字母时，使用^需要放在匹配符前\n",
    "### 相对的的如果是匹配尾字母时，使用$则需要放在最后"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 131,
   "metadata": {},
   "outputs": [],
   "source": [
    "# pattern:   a\\b表示字符a或者b，注：a,b任意"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 132,
   "metadata": {},
   "outputs": [],
   "source": [
    "res1=re.findall(r'www.(?:baidu|oldboy).com','www.baidu.com')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 134,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['www.baidu.com']"
      ]
     },
     "execution_count": 134,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "res1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 166,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "['b', 'a', 'i', 'd', 'u']\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "['baidu']"
      ]
     },
     "execution_count": 166,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "print(re.findall(r'[baidu,oldboy]','baidu'))\n",
    "re.findall(r'(baidu|oldboy)','baidu')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 138,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['baidu']"
      ]
     },
     "execution_count": 138,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "re.findall(r'www.(baidu|oldboy).com','www.baidu.com')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 139,
   "metadata": {},
   "outputs": [],
   "source": [
    "###  通过?:来取消权限，即保留原来的非匹配字符"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "www.cctalk.com"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 140,
   "metadata": {},
   "outputs": [],
   "source": [
    "cc='www.cctalk.com'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 151,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'https://ashleyzh666.github.io/\\nwww.cctalk.com'"
      ]
     },
     "execution_count": 151,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "url+('\\n')+cc"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 153,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "\n"
     ]
    }
   ],
   "source": [
    "print('\\n')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 154,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'\\n'"
      ]
     },
     "execution_count": 154,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "'\\n'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 155,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['a', 'b', 'c', '']"
      ]
     },
     "execution_count": 155,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "re.split('\\d+','a1b2c3')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 156,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['', 'bcd']"
      ]
     },
     "execution_count": 156,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "re.split('[a]','abcd')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 157,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['', 'bcd']"
      ]
     },
     "execution_count": 157,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "re.split('a','abcd')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 158,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['', 'cd']"
      ]
     },
     "execution_count": 158,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "re.split('ab','abcd')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 159,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['', '', 'cd']"
      ]
     },
     "execution_count": 159,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "re.split('[ab]','abcd')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 160,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['ab', '', '']"
      ]
     },
     "execution_count": 160,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "re.split('[^ab]','abcd')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 161,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['', '', 'cd']"
      ]
     },
     "execution_count": 161,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "re.split('[ab$]','abcd')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 163,
   "metadata": {},
   "outputs": [],
   "source": [
    "cc=re.split('[ab$]','abcd')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 164,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "3"
      ]
     },
     "execution_count": 164,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(cc)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 正则表达式的变化性相对多样\n",
    "\n",
    "##### 必须要多多实践，附上实践视频：https://www.bilibili.com/video/BV1wW411Y7ai?p=36\n",
    "##### 正则总结：https://www.cnblogs.com/huxi/archive/2010/07/04/1771073.html"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 171,
   "metadata": {},
   "outputs": [],
   "source": [
    "space=['\\t','\\n','\\r','\\f','\\v']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 172,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "5"
      ]
     },
     "execution_count": 172,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(space)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 176,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "ashley\n",
      "\t *\n",
      "\n",
      " *\n",
      "\r",
      " *\n",
      "\f",
      " *\n",
      "\u000b",
      " *\n"
     ]
    }
   ],
   "source": [
    "print(\"ashley\")\n",
    "for i in space:\n",
    "    print(i,'*')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
